<!--#include file="inc/conn.asp" -->
<%CheckAdmin()%>
<!--#include file="inc/Function.asp" -->
<%
strtitle=ServerName&"-数据统计"
Call  head(strtitle)

If browser()="pc" Then Call  LeftMenu()

If request("Action")<>"" Then 
SET RS1 = Conn.Execute("SELECT count(user_no)  FROM user_profile ")
SET RS2 = Conn.Execute("SELECT count(user_no)  FROM user_profile where DateDiff(dd,reg_time,getdate())=0")
SET RS3 = Conn_c.Execute("SELECT count(character_no)  FROM user_character ")
'SET RS5 = Conn.Execute("SELECT top 1 nUserCount FROM _ShardCurrentUser  ORDER BY nID desc")
'SET RS6 = Conn.Execute("SELECT top 1 nUserCount,dlogDate FROM _ShardCurrentUser   ORDER BY nUserCount desc")
AllReg=rs1(0)
TodayReg=rs2(0)
CharCount=rs3(0)
RS1.close
RS2.close
RS3.close


		  SET RS1_count = Conn_P.Execute("select count(id) from PayLog where trade_status>0 "&sqlstr)
		  If RS1_count(0)>0 Then 
		  pay_count=RS1_count(0)
		  End If 
		  

		  SET RS2_count = Conn_P.Execute("select sum(amount) from PayLog  where trade_status>0 "&sqlstr)
		  If RS2_count(0)>0 Then 
		  pay_count2=RS2_count(0)
		  End If 

		  SET RS3_count = Conn_P.Execute("select sum(gamecash) from PayLog  where trade_status>0 "&sqlstr2)
		  If RS3_count(0)>0 Then 
		  pay_count3=RS3_count(0)
		  End If 

		  RS1_count.close
		  RS2_count.close
		  RS3_count.close
		  End If 
  %>




<style>
    .layui-top-box {padding:20px 20px 0px 20px;color:#fff}
    .panel {margin-bottom:17px;background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
    .panel-body {padding:15px}
    .panel-title {margin-top:0;margin-bottom:0;font-size:14px;color:inherit}
    .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top: .3em;}
	.pull-right {
  float: right;
}
</style>
  <div class="page-content">
<%Call  mnav()%>
	<div class="weadmin-body ">
		<div class="layui-row layui-col-space10 layui-top-box">

            <div class="layui-col-md2" style="width:230px;margin-right:10px">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-cyan">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-blue">实时</span>
                                <h5>用户统计</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">1234</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                <small>当前分类总记录数</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md2" style="width:230px;margin-right:10px">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-blue">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-cyan">实时</span>
                                <h5>商品统计</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">1234</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                <small>当前分类总记录数</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md2" style="width:230px;margin-right:10px">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-green">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-orange">实时</span>
                                <h5>浏览统计</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">1234</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                <small>当前分类总记录数</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


<%

%>

            <div class="layui-col-md2" style="width:230px;margin-right:10px">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-orange">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-green">实时</span>
                                <h5>订单统计</h5>
                            </div>
                            <div class="panel-content">
							<h1 class="no-margins"><%=pay_count%></h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 金额<%=pay_count2%></div>
								<small>发送商城币：<%=pay_count3%></small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
			<%

		  %>
			  <div class="layui-col-md2" style="width:230px;margin-right:10px">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-cyan">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-blue">实时</span>
                                <h5>用户统计</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">1234</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                <small>当前分类总记录数</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>



<div class="layui-col-md12">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-line-chart icon"></i>报表统计</div>
                            <div class="layui-card-body">
                                <div id="main2" style="width: 100%;min-height:400px"></div>
                            </div>
                        </div>
                    </div>
                       

        </div>

            </div>



<script src="./lib/js/echarts.min.js"></script>
       
	<script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main2'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '最近30天注册'
            },
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎']
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            toolbox: {
                feature: {
                    saveAsImage: {}
                }
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                data: ['周一','周二','周三','周四','周五','周六','周日']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    name:'邮件营销',
                    type:'line',
                    stack: '总量',
                    data:[120, 132, 101, 134, 90, 230, 210]
                },
              
                {
                    name:'搜索引擎',
                    type:'line',
                    stack: '总量',
                    data:[820, 932, 901, 934, 1290, 1330, 1320]
                }
            ]
        };


        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
		</div>
  </div>
</body>
</html>